package ptumall.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import ptumall.model.Users;

@Mapper
public interface UsersDao {
    // 根据 openid 查询用户
    Users selectByOpenid(@Param("openid") String openid);

    @Select("SELECT * FROM users WHERE openid = #{openid}")
    Users findByOpenid(String openid);

    // 插入新用户
    int insertUser(Users users);

    // 更新用户信息（如昵称、头像等）
    int updateUser(Users users);


}
